/**
 * 
 */
package com.cqan.account.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.cqan.entity.pk.LongEntity;


/**
 * @Description 用户收藏数据实体
 * @author slaton.wu@gmail.com
 * @date 2012-7-17上午10:51:57
 *
 */
@Entity
//表名与类名不相同时重新定义表名.
@Table(name = "TBL_FAVORITE")
//默认的缓存策略.
@SuppressWarnings("serial")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Favorite extends LongEntity {

	private Date createTime;
	
	/**
	 * AUDIO,EBOOK,OTHER,VIDEO,NODE
	 */
	private String favoriteType;
	
	private String name;
	
	//节点id
	private Long nid;
	
	
	/**
	 * 数据来源 来源于数据发布平台时 nid不能为空
	 *  SITE:数据发布平台
	 * INTERNET:互联网
	 */
	private String orig;

	//app id
	private Long pid;

	private Long uid;

	private String url;

	@Column(name="CREATE_TIME")
	public Date getCreateTime() {
		return createTime;
	}

	@Column(name="fAVORITE_TYPE")
	public String getFavoriteType() {
		return favoriteType;
	}

	@Column(name="NAME")
	public String getName() {
		return name;
	}

	@Column(name="NID")
	public Long getNid() {
		return nid;
	}

	@Column(name="ORIG")
	public String getOrig() {
		return orig;
	}

	@Column(name="PID")
	public Long getPid() {
		return pid;
	}

	
	@Column(name="UID")
	public Long getUid() {
		return uid;
	}

	@Column(name="URL")
	public String getUrl() {
		return url;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public void setFavoriteType(String favoriteType) {
		this.favoriteType = favoriteType;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setNid(Long nid) {
		this.nid = nid;
	}

	public void setOrig(String orig) {
		this.orig = orig;
	}
	
	public void setPid(Long pid) {
		this.pid = pid;
	}
	
	public void setUid(Long uid) {
		this.uid = uid;
	}
	
	public void setUrl(String url) {
		this.url = url;
	}
}
